package tech.aistar.controller;


import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import tech.aistar.entity.*;
import tech.aistar.service.ICostService;
import tech.aistar.service.IEnvironmentFacilityService;
import tech.aistar.service.IHouseService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.jar.JarOutputStream;


@Controller
@RequestMapping("/House")
public class HouseAction {
    @Autowired
    private IHouseService houseService;
    @Autowired
    private ICostService costService;
    @Autowired
    private IEnvironmentFacilityService environmentFacilityService;

    //======================学生 - 房源设施 =====================
    @RequestMapping("/student")
    public String student(HttpServletRequest request) {
        String lab = request.getParameter("lab");
        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == null ? "1" : pageNow;
        PageInfo<House> pageInfo = houseService.findByPage(null, lab, Integer.valueOf(pageNow), 8);
        request.setAttribute("page", pageInfo);

        return "/rent/student";
    }

    @RequestMapping("/find2")
    public String studentTwo(HttpServletRequest request) {
        String str = request.getParameter("sea");
        String lab = null;
        String min = null;
        String max = null;
        String type = null;
        String chao = null;
        if (request.getParameter("lab") != "") {
            lab = request.getParameter("lab");
        }


        if (request.getParameter("min") != "") {
            min = request.getParameter("min");
        }
        if (request.getParameter("max") != "") {
            max = request.getParameter("max");
        }
        if (request.getParameter("huType") != "") {
            type = request.getParameter("huType");
        }
        if (request.getParameter("chao") != "") {
            chao = request.getParameter("chao");
        }
        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == null ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.finalPage(lab, min, max, type, chao, Integer.valueOf(pageNow), 8);
//        pageInfo.getList().forEach(e-> System.out.println(e));
        request.setAttribute("page", pageInfo);

        request.setAttribute("sea", str);
        return "/rent/student";
    }


    @RequestMapping("/findCheck")
    public @ResponseBody
    Result studentThree(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");

        String lab = null;
        String min = null;
        String max = null;
        String type = null;
        String chao = null;
        if (request.getParameter("lab") != "") {
            lab = request.getParameter("lab");
        }

        if (request.getParameter("min") != "") {
            min = request.getParameter("min");
        }
        if (request.getParameter("max") != "") {
            max = request.getParameter("max");
        }
        if (request.getParameter("huType") != "") {
            type = request.getParameter("huType");
        }
        if (request.getParameter("chao") != "") {
            chao = request.getParameter("chao");
        }

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.finalPage(lab, min, max, type, chao, Integer.valueOf(pageNow), 8);
//        pageInfo.getList().forEach(e-> System.out.println(e));
        Result result = new Result("200", "成功", pageInfo);

        return result;
    }


    @GetMapping("/xinxi")
    public String select(HttpServletRequest request, Integer id) {
        House house = (House) houseService.findById(id);
        request.setAttribute("house", house);
        return "/rent_info/studentfangyuanxinxi";
    }



    @RequestMapping("/studentHuan")
    public @ResponseBody
    Result studentFu(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");
        String box1 = request.getParameter("box1");
        String box2 = request.getParameter("box2");
        String box3 = request.getParameter("box3");
        String box4 = request.getParameter("box4");
        String box5 = request.getParameter("box5");
        String box6 = request.getParameter("box6");
        String box7 = request.getParameter("box7");
        String box8 = request.getParameter("box8");
        String box9 = request.getParameter("box9");
        String box10 = request.getParameter("box10");
        String box11 = request.getParameter("box11");
        String box12 = request.getParameter("box12");
        String box13 = request.getParameter("box13");
        String box14 = request.getParameter("box14");
        String boxa = request.getParameter("boxa");
        String boxb = request.getParameter("boxb");
        String boxc = request.getParameter("boxc");
        String boxd = request.getParameter("boxd");
        String boxe = request.getParameter("boxe");
        String boxf = request.getParameter("boxf");

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.houseStudentFacilityPage(
                boxa, boxe, boxf, boxb, box1,
                box2, box5, box4, box3, box6,
                box7, box13, box12, box11, boxc,
                boxd, box8, box14, box10, box9,
                Integer.valueOf(pageNow), 8);

        Result result = new Result("200", "成功", pageInfo);

        return result;
    }

    @RequestMapping("/studentfu")
    public String student(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");
        String box1 = request.getParameter("box1");
        String box2 = request.getParameter("box2");
        String box3 = request.getParameter("box3");
        String box4 = request.getParameter("box4");
        String box5 = request.getParameter("box5");
        String box6 = request.getParameter("box6");
        String box7 = request.getParameter("box7");
        String box8 = request.getParameter("box8");
        String box9 = request.getParameter("box9");
        String box10 = request.getParameter("box10");
        String box11 = request.getParameter("box11");
        String box12 = request.getParameter("box12");
        String box13 = request.getParameter("box13");
        String box14 = request.getParameter("box14");
        String boxa = request.getParameter("boxa");
        String boxb = request.getParameter("boxb");
        String boxc = request.getParameter("boxc");
        String boxd = request.getParameter("boxd");
        String boxe = request.getParameter("boxe");
        String boxf = request.getParameter("boxf");

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.houseStudentFacilityPage(
                boxa, boxe, boxf, boxb, box1,
                box2, box5, box4, box3, box6,
                box7, box13, box12, box11, boxc,
                boxd, box8, box14, box10, box9,
                Integer.valueOf(pageNow), 8);

        request.setAttribute("page", pageInfo);

        return "/rent/student";
    }



    //==================================白领 - 房源设施=======================================
    @RequestMapping("/white")
    public String white(HttpServletRequest request) {
        String str = request.getParameter("sea");
        String lab = null;
        String min = null;
        String max = null;
        String type = null;
        String chao = null;
        if (request.getParameter("lab") != "") {
            lab = request.getParameter("lab");
        }
        if (request.getParameter("min") != "") {
            min = request.getParameter("min");
        }
        if (request.getParameter("max") != "") {
            max = request.getParameter("max");
        }
        if (request.getParameter("huType") != "") {
            type = request.getParameter("huType");
        }
        if (request.getParameter("chao") != "") {
            chao = request.getParameter("chao");
        }
        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == null ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.finalWhitePage(lab, min, max, type, chao, Integer.valueOf(pageNow), 8);
//        pageInfo.getList().forEach(e-> System.out.println(e));
        request.setAttribute("page", pageInfo);

        request.setAttribute("sea", str);
        return "/rent/white";
    }


    @RequestMapping("/whiteCheck")
    public @ResponseBody
    Result whiteTwo(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");

        String lab = null;
        String min = null;
        String max = null;
        String type = null;
        String chao = null;
        if (request.getParameter("lab") != "") {
            lab = request.getParameter("lab");
        }

        if (request.getParameter("min") != "") {
            min = request.getParameter("min");
        }
        if (request.getParameter("max") != "") {
            max = request.getParameter("max");
        }
        if (request.getParameter("huType") != "") {
            type = request.getParameter("huType");
        }
        if (request.getParameter("chao") != "") {
            chao = request.getParameter("chao");
        }

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.finalWhitePage(lab, min, max, type, chao, Integer.valueOf(pageNow), 8);
//        pageInfo.getList().forEach(e-> System.out.println(e));
        Result result = new Result("200", "成功", pageInfo);

        return result;
    }

    @GetMapping("/whiteInfo")
    public String whiteInfo(HttpServletRequest request, Integer id) {
        House house = (House) houseService.findById(id);
        request.setAttribute("house", house);
        return "/rent_info/whitefangyuanxinxi";
    }


    @RequestMapping("/Huan")
    public @ResponseBody
    Result whiteFu(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");
        String box1 = request.getParameter("box1");
        String box2 = request.getParameter("box2");
        String box3 = request.getParameter("box3");
        String box4 = request.getParameter("box4");
        String box5 = request.getParameter("box5");
        String box6 = request.getParameter("box6");
        String box7 = request.getParameter("box7");
        String box8 = request.getParameter("box8");
        String box9 = request.getParameter("box9");
        String box10 = request.getParameter("box10");
        String box11 = request.getParameter("box11");
        String box12 = request.getParameter("box12");
        String box13 = request.getParameter("box13");
        String box14 = request.getParameter("box14");
        String boxa = request.getParameter("boxa");
        String boxb = request.getParameter("boxb");
        String boxc = request.getParameter("boxc");
        String boxd = request.getParameter("boxd");
        String boxe = request.getParameter("boxe");
        String boxf = request.getParameter("boxf");

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.houseFacilityPage(boxa, boxe, boxf, boxb, box1, box2, box5, box4, box3, box6, box7, box13, box12, box11, boxc, boxd, box8, box14, box10, box9, Integer.valueOf(pageNow), 8);
        Result result = new Result("200", "成功", pageInfo);

        return result;
    }

    @RequestMapping("/whitefu")
    public String white(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");
        String box1 = request.getParameter("box1");
        String box2 = request.getParameter("box2");
        String box3 = request.getParameter("box3");
        String box4 = request.getParameter("box4");
        String box5 = request.getParameter("box5");
        String box6 = request.getParameter("box6");
        String box7 = request.getParameter("box7");
        String box8 = request.getParameter("box8");
        String box9 = request.getParameter("box9");
        String box10 = request.getParameter("box10");
        String box11 = request.getParameter("box11");
        String box12 = request.getParameter("box12");
        String box13 = request.getParameter("box13");
        String box14 = request.getParameter("box14");
        String boxa = request.getParameter("boxa");
        String boxb = request.getParameter("boxb");
        String boxc = request.getParameter("boxc");
        String boxd = request.getParameter("boxd");
        String boxe = request.getParameter("boxe");
        String boxf = request.getParameter("boxf");

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.houseFacilityPage(
                boxa, boxe, boxf, boxb, box1,
                box2, box5, box4, box3, box6,
                box7, box13, box12, box11, boxc,
                boxd, box8, box14, box10, box9,
                Integer.valueOf(pageNow), 8);

        request.setAttribute("page", pageInfo);

        return "/rent/white";
    }




    //=============================合租 - 房源设施=======================================

    //合租
    @RequestMapping("/Hezu")
    public String HeZu(HttpServletRequest request) {
        String str = request.getParameter("sea");
        String lab = null;
        String min = null;
        String max = null;
        String type = null;
        String chao = null;
        if (request.getParameter("lab") != "") {
            lab = request.getParameter("lab");
        }


        if (request.getParameter("min") != "") {
            min = request.getParameter("min");
        }
        if (request.getParameter("max") != "") {
            max = request.getParameter("max");
        }
        if (request.getParameter("huType") != "") {
            type = request.getParameter("huType");
        }
        if (request.getParameter("chao") != "") {
            chao = request.getParameter("chao");
        }
        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == null ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.finalHePage(lab, min, max, type, chao, Integer.valueOf(pageNow), 8);
//        pageInfo.getList().forEach(e-> System.out.println(e));
        request.setAttribute("page", pageInfo);

        request.setAttribute("sea", str);
        return "/rent/hezuyemian";
    }


    @RequestMapping("/HezuCheck")
    public @ResponseBody
    Result HeZuTwo(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");

        String lab = null;
        String min = null;
        String max = null;
        String type = null;
        String chao = null;
        if (request.getParameter("lab") != "") {
            lab = request.getParameter("lab");
        }

        if (request.getParameter("min") != "") {
            min = request.getParameter("min");
        }
        if (request.getParameter("max") != "") {
            max = request.getParameter("max");
        }
        if (request.getParameter("huType") != "") {
            type = request.getParameter("huType");
        }
        if (request.getParameter("chao") != "") {
            chao = request.getParameter("chao");
        }

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.finalHePage(lab, min, max, type, chao, Integer.valueOf(pageNow), 8);
//        pageInfo.getList().forEach(e-> System.out.println(e));
        Result result = new Result("200", "成功", pageInfo);

        return result;
    }

    @GetMapping("/HezuInfo")
    public String HezuInfo(HttpServletRequest request, Integer id) {
        House house = (House) houseService.findById(id);
        request.setAttribute("house", house);
        return "/rent_info/hezufangyuanxinxi";
    }

    @RequestMapping("/hezuHuan")
    public @ResponseBody
    Result heZuFu(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");
        String box1 = request.getParameter("box1");
        String box2 = request.getParameter("box2");
        String box3 = request.getParameter("box3");
        String box4 = request.getParameter("box4");
        String box5 = request.getParameter("box5");
        String box6 = request.getParameter("box6");
        String box7 = request.getParameter("box7");
        String box8 = request.getParameter("box8");
        String box9 = request.getParameter("box9");
        String box10 = request.getParameter("box10");
        String box11 = request.getParameter("box11");
        String box12 = request.getParameter("box12");
        String box13 = request.getParameter("box13");
        String box14 = request.getParameter("box14");
        String boxa = request.getParameter("boxa");
        String boxb = request.getParameter("boxb");
        String boxc = request.getParameter("boxc");
        String boxd = request.getParameter("boxd");
        String boxe = request.getParameter("boxe");
        String boxf = request.getParameter("boxf");

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.houseHeFacilityPage(
                boxa, boxe, boxf, boxb, box1,
                box2, box5, box4, box3, box6,
                box7, box13, box12, box11, boxc,
                boxd, box8, box14, box10, box9,
                Integer.valueOf(pageNow), 8);

        Result result = new Result("200", "成功", pageInfo);

        return result;
    }

    @RequestMapping("/hezufu")
    public String heZu(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");
        String box1 = request.getParameter("box1");
        String box2 = request.getParameter("box2");
        String box3 = request.getParameter("box3");
        String box4 = request.getParameter("box4");
        String box5 = request.getParameter("box5");
        String box6 = request.getParameter("box6");
        String box7 = request.getParameter("box7");
        String box8 = request.getParameter("box8");
        String box9 = request.getParameter("box9");
        String box10 = request.getParameter("box10");
        String box11 = request.getParameter("box11");
        String box12 = request.getParameter("box12");
        String box13 = request.getParameter("box13");
        String box14 = request.getParameter("box14");
        String boxa = request.getParameter("boxa");
        String boxb = request.getParameter("boxb");
        String boxc = request.getParameter("boxc");
        String boxd = request.getParameter("boxd");
        String boxe = request.getParameter("boxe");
        String boxf = request.getParameter("boxf");

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.houseHeFacilityPage(
                boxa, boxe, boxf, boxb, box1,
                box2, box5, box4, box3, box6,
                box7, box13, box12, box11, boxc,
                boxd, box8, box14, box10, box9,
                Integer.valueOf(pageNow), 8);

        request.setAttribute("page", pageInfo);

        return "/rent/hezuyemian";
    }


    //==========================整租 - 房源设施 ===============

    //初始进来页面
    @RequestMapping("/Zhengzu")
    public String Zhengzu(HttpServletRequest request) {

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == null ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.finalZhengAllPage(Integer.valueOf(pageNow), 8);
        request.setAttribute("page", pageInfo);
        return "/rent/zhengzuyemian";
    }


    @RequestMapping("/Zheng")
    public String Zheng(HttpServletRequest request) {
        String str = request.getParameter("sea");
        String lab = null;
        String min = null;
        String max = null;
        String type = null;
        String chao = null;
        if (request.getParameter("lab") != "") {
            lab = request.getParameter("lab");
        }

        if (request.getParameter("min") != "") {
            min = request.getParameter("min");
        }
        if (request.getParameter("max") != "") {
            max = request.getParameter("max");
        }
        if (request.getParameter("huType") != "") {
            type = request.getParameter("huType");
        }
        if (request.getParameter("chao") != "") {
            chao = request.getParameter("chao");
        }
        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == null ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.finalZhengPage(lab, min, max, type, chao, Integer.valueOf(pageNow), 8);
//        pageInfo.getList().forEach(e-> System.out.println(e));
        request.setAttribute("page", pageInfo);

        request.setAttribute("sea", str);
        return "/rent/zhengzuyemian";
    }


    @RequestMapping("/ZhengCheck")
    public @ResponseBody
    Result ZhengTwo(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");

        String lab = null;
        String min = null;
        String max = null;
        String type = null;
        String chao = null;
        if (request.getParameter("lab") != "") {
            lab = request.getParameter("lab");
        }

        if (request.getParameter("min") != "") {
            min = request.getParameter("min");
        }
        if (request.getParameter("max") != "") {
            max = request.getParameter("max");
        }
        if (request.getParameter("huType") != "") {
            type = request.getParameter("huType");
        }
        if (request.getParameter("chao") != "") {
            chao = request.getParameter("chao");
        }

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.finalZhengPage(lab, min, max, type, chao, Integer.valueOf(pageNow), 8);
//        pageInfo.getList().forEach(e-> System.out.println(e));
        Result result = new Result("200", "成功", pageInfo);

        return result;
    }

    @GetMapping("/ZhengInfo")
    public String ZhengInfo(HttpServletRequest request, Integer id) {
        House house = (House) houseService.findById(id);
        request.setAttribute("house", house);
        return "/rent_info/zhengzufangyuanxinxi";
    }


    @RequestMapping("/zhengHuan")
    public @ResponseBody
    Result zhengFu(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");
        String box1 = request.getParameter("box1");
        String box2 = request.getParameter("box2");
        String box3 = request.getParameter("box3");
        String box4 = request.getParameter("box4");
        String box5 = request.getParameter("box5");
        String box6 = request.getParameter("box6");
        String box7 = request.getParameter("box7");
        String box8 = request.getParameter("box8");
        String box9 = request.getParameter("box9");
        String box10 = request.getParameter("box10");
        String box11 = request.getParameter("box11");
        String box12 = request.getParameter("box12");
        String box13 = request.getParameter("box13");
        String box14 = request.getParameter("box14");
        String boxa = request.getParameter("boxa");
        String boxb = request.getParameter("boxb");
        String boxc = request.getParameter("boxc");
        String boxd = request.getParameter("boxd");
        String boxe = request.getParameter("boxe");
        String boxf = request.getParameter("boxf");

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.houseZhengFacilityPage(
                boxa, boxe, boxf, boxb, box1,
                box2, box5, box4, box3, box6,
                box7, box13, box12, box11, boxc,
                boxd, box8, box14, box10, box9,
                Integer.valueOf(pageNow), 8);

        Result result = new Result("200", "成功", pageInfo);

        return result;
    }

    @RequestMapping("/zhengfu")
    public String zheng(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");
        String box1 = request.getParameter("box1");
        String box2 = request.getParameter("box2");
        String box3 = request.getParameter("box3");
        String box4 = request.getParameter("box4");
        String box5 = request.getParameter("box5");
        String box6 = request.getParameter("box6");
        String box7 = request.getParameter("box7");
        String box8 = request.getParameter("box8");
        String box9 = request.getParameter("box9");
        String box10 = request.getParameter("box10");
        String box11 = request.getParameter("box11");
        String box12 = request.getParameter("box12");
        String box13 = request.getParameter("box13");
        String box14 = request.getParameter("box14");
        String boxa = request.getParameter("boxa");
        String boxb = request.getParameter("boxb");
        String boxc = request.getParameter("boxc");
        String boxd = request.getParameter("boxd");
        String boxe = request.getParameter("boxe");
        String boxf = request.getParameter("boxf");

        String pageNow = request.getParameter("pageNow");
        pageNow = pageNow == "" ? "1" : pageNow;

        PageInfo<House> pageInfo = houseService.houseZhengFacilityPage(
                boxa, boxe, boxf, boxb, box1,
                box2, box5, box4, box3, box6,
                box7, box13, box12, box11, boxc,
                boxd, box8, box14, box10, box9,
                Integer.valueOf(pageNow), 8);

        request.setAttribute("page", pageInfo);

        return "/rent/zhengzuyemian";
    }

    @RequestMapping("/zhengjie")
    public String zhengJie(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("text/json;charset=utf-8");
        String fridge = request.getParameter("fridge");
        String television = request.getParameter("television");
        String airCondition = request.getParameter("airCondition");
        String geyser = request.getParameter("geyser");
        String washingMachine = request.getParameter("washingMachine");
        String broadband = request.getParameter("broadband");
        String sofa = request.getParameter("sofa");
        String balcony = request.getParameter("balcony");
        String gasStove = request.getParameter("gasStove");
        String rangeHood = request.getParameter("rangeHood");
        String wardrobe = request.getParameter("wardrobe");
        String heat = request.getParameter("heat");
        String bed = request.getParameter("bed");
        String intelligentLock = request.getParameter("intelligentLock");
        String greenery = request.getParameter("greenery");
        String schoolNearbyHouse = request.getParameter("schoolNearbyHouse");
        String cookingable = request.getParameter("cookingable");
        String bathroom = request.getParameter("bathroom");
        String trafficConvenient = request.getParameter("trafficConvenient");
        String shoppingConvenient = request.getParameter("shoppingConvenient");
        PageInfo<House> pageInfo = houseService.houseZhengFacilityPage(
                greenery, trafficConvenient, shoppingConvenient,schoolNearbyHouse ,fridge,
                television, washingMachine, geyser, airCondition, broadband,
                sofa, bed, heat, wardrobe, cookingable,
                bathroom, balcony, intelligentLock, rangeHood, gasStove,
                1, 8);

        request.setAttribute("page", pageInfo);

        return "/rent/zhengzuyemian";
    }


    @RequestMapping("/ZhengType")
    public String ZhengType(HttpServletRequest request) {
        String houseType = request.getParameter("houseType");
        String orientate = request.getParameter("orientate");
        PageInfo<House> pageInfo = houseService.finalZhengPage(null, null, null, houseType, orientate, 1, 8);
//        pageInfo.getList().forEach(e-> System.out.println(e));
        request.setAttribute("page", pageInfo);

        return "/rent/zhengzuyemian";
    }




}